package pers.wangyuhang.demo2;

/**
 * Created with IntelliJ IDEA.
 * Desciption:
 * User: 15716
 * Date: 2021-12-23
 * Time: 17:29
 */
public class Student extends Person {
    String major;
    int id = 1002;

    public Student() {

    }

    public Student(String major) {

        this.major = major;
        //super("name",11);
    }

    public Student (String name,int age,String major) {
        super("wanghua",12);
    }

    public void eat() {

        //super("hsdf",32);
        System.out.println("学生多吃有营养的事物");
        //super.eat();
    }

    public void study() {
        System.out.println("学生学习知识");
    }

    public void show() {
        System.out.println(id);
        System.out.println(super.id);
    }

}
